package cnpm.entity;

import java.io.Serializable;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;

@Entity
public class Insurance implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	@Id
	@Column(name = "InsuranceID")
	private String insuranceID;
	
	@Column(name = "InsuranceType")
	private String insurancType;
	
	@Column(name = "RegDate")
	private String regDate;
	
	@Column(name = "RegLocation")
	private String regLocation;
	
	@Column(name = "PayForm")
	private String payForm;
	
	@Column(name = "Money")
	private int money;
	
	@Column(name = "UpdateDate")
	private String updateDate;
	
	@Column(name = "CreateDate")
	private String createDate;
	
	@Column(name = "UserUpdate")
	private String userUpdate;
	
	@Column(name = "UserCreate")
	private String userCreate;
	
	@ManyToOne(cascade = CascadeType.MERGE, fetch = FetchType.EAGER)
	private Employee empInsurance;
	
	public Insurance(){}

	public String getInsuranceID() {
		return insuranceID;
	}

	public void setInsuranceID(String insuranceID) {
		this.insuranceID = insuranceID;
	}

	public String getInsurancType() {
		return insurancType;
	}

	public void setInsurancType(String insurancType) {
		this.insurancType = insurancType;
	}

	public String getRegDate() {
		return regDate;
	}

	public void setRegDate(String regDate) {
		this.regDate = regDate;
	}

	public String getRegLocation() {
		return regLocation;
	}

	public void setRegLocation(String regLocation) {
		this.regLocation = regLocation;
	}

	public String getPayForm() {
		return payForm;
	}

	public void setPayForm(String payForm) {
		this.payForm = payForm;
	}

	public int getMoney() {
		return money;
	}

	public void setMoney(int money) {
		this.money = money;
	}

	public Employee getEmpInsurance() {
		return empInsurance;
	}

	public void setEmpInsurance(Employee empInsurance) {
		this.empInsurance = empInsurance;
	}

	public String getUpdateDate() {
		return updateDate;
	}

	public void setUpdateDate(String updateDate) {
		this.updateDate = updateDate;
	}

	public String getCreateDate() {
		return createDate;
	}

	public void setCreateDate(String createDate) {
		this.createDate = createDate;
	}

	public String getUserUpdate() {
		return userUpdate;
	}

	public void setUserUpdate(String userUpdate) {
		this.userUpdate = userUpdate;
	}

	public String getUserCreate() {
		return userCreate;
	}

	public void setUserCreate(String userCreate) {
		this.userCreate = userCreate;
	}

	@Override
	public String toString() {
		return "Insurance [insuranceID=" + insuranceID + ", insurancType="
				+ insurancType + ", regDate=" + regDate + ", regLocation="
				+ regLocation + ", payForm=" + payForm + "]";
	}
	
}
